package com.example.demo.util.aspose;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

@Getter
@Setter
public class ImageBo implements Serializable {

    /**
     * 获取图片文件流的协议路径，最终会使用 new URL(protocolPath).openStream() 的方式获取文件流信息
     */
    private String protocolPath;

    /**
     * 设置图片的对应大小(宽和高)
     */
    private Size size;

    private Position position;


    @Getter
    @Setter
    @AllArgsConstructor
    @NoArgsConstructor
    static class Size {
        private Double width  = 200D;
        private Double height = 200D;
    }

    @Getter
    @Setter
    @AllArgsConstructor
    @NoArgsConstructor
    static class Position {
        Integer horzPos  = 2;
        Double  left     = 0.0D;
        Integer vertPos  = 2;
        Double  top      = 0.0D;
        Integer wrapType = 0;
    }
}
